Release Plan
This document mainly introduces how to use Open API to operate Zadig's release plans.
# Release Plan
# Get Release Plan List
Request
GET /openapi/release_plan/v1
1
Query
| Parameter Name | Type | Description | Required | Default |
|---|---|---|---|---|
pageNum | int | Pagination parameter - current page | Yes | None |
pageSize | int | Pagination parameter - items per page | Yes | None |
Response Description
| Parameter Name | Type | Description |
|---|---|---|
id | string | Release plan primary key |
name | string | Release plan name |
index | int | Release plan sequence number |
manager | string | Release manager |
description | string | Requirement association |
create_time | int | Release plan creation time |
created_by | string | Creator |
Success Response
{
"list": [
{
"id": "64f58a7ac573f7325c2744b6",
"index": 31,
"name": "test-workflow-0904",
"manager": "admin",
"description": "",
"created_by": "admin",
"create_time": 1693813370
}
],
"total": 26
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# Get Release Plan Details
Request
GET /openapi/release_plan/v1/:id
1
Path Parameter Description
| Parameter Name | Type | Description | Required | Default |
|---|---|---|---|---|
id | string | Release plan primary key | Yes | None |
Success Response
{
"id": "64f1a7cd1b7bd46ec353b50c",
"index": 21,
"name": "plan-A",
"manager": "admin",
"manager_id": "c565c7eb-e273-11ed-bef9-a659ed9f1ed1",
"start_time": 1693558721, // Release window
"end_time": 1694016000, // Release window
"description": "",
"created_by": "admin",
"create_time": 1693558733,
"updated_by": "admin",
"update_time": 1693558750,
"approval": { // Approval configuration
"enabled": true,
"status": "",
"type": "native",
"description": "",
"native_approval": {
"timeout": 5,
"approve_users": [
{
"user_id": "c565c7eb-e273-11ed-bef9-a659ed9f1ed1",
"user_name": "admin",
"reject_or_approve": "",
"comment": "",
"operation_time": 0
}
],
"needed_approvers": 1,
"reject_or_approve": "",
"instance_code": ""
},
"lark_approval": {
"timeout": 5,
"approval_id": "",
"default_approval_initiator": null,
"approve_users": [],
"approval_nodes": [
{
"approve_users": [],
"type": "AND",
"reject_or_approve": ""
}
],
"instance_code": ""
},
"dingtalk_approval": {
"timeout": 5,
"approval_id": "",
"default_approval_initiator": null,
"approval_nodes": [
{
"approve_users": [],
"type": "AND",
"reject_or_approve": ""
}
],
"instance_code": ""
}
},
"jobs": [
{
"id": "0b655ad6-5d08-4f1c-8ff6-7eb004c7c7bd",
"name": "中间件变更",
"type": "text",
"spec": {
"content": "<p>2222</p><p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"https://www.froala.com/wysiwyg-editor?pb=1\" title=\"Froala Editor\">Froala Editor</a></p>"
},
"status": "",
"last_status": "",
"updated": true,
"executed_by": "",
"executed_time": 0
}
],
"status": "planning",
"planning_time": 0, // Time to complete planning status
"approval_time": 0, // Time to complete approval status
"executing_time": 0, // Time to complete execution status
"success_time": 0 // Success time
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Create Release Plan
Request
POST /openapi/release_plan/v1
1
Body Parameter Description
| Parameter Name | Type | Description | Required | Default |
|---|---|---|---|---|
name | string | Release plan name | Yes | None |
manager | string | Release manager username | Yes | None |
manager_identity_type | string | Release manager user type: system (default), ldap, oauth, etc. | Yes | None |
description | string | Requirement association | No | None |
start_time | int | Release window - start time | No | None |
end_time | int | Release window - end time | No | None |
approval | approval | Approval configuration, specific fields can refer to the create custom workflow section | No | None |
Body Parameter Example
{
"name": "plan-example",
"manager": "admin",
"manager_identity_type": "system",
"start_time": 1693558721, // Release window
"end_time": 1694016000, // Release window
"description": "",
"approval": { // Approval configuration
"enabled": true,
"status": "",
"type": "native",
"description": "",
"native_approval": {
"timeout": 5,
"approve_users": [
{
"user_id": "c565c7eb-e273-11ed-bef9-a659ed9f1ed1",
"user_name": "admin",
"reject_or_approve": "",
"comment": "",
"operation_time": 0
}
],
"needed_approvers": 1,
"reject_or_approve": "",
"instance_code": ""
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


